const express = require('express')
const expressJoi = require('@escook/express-joi')
const { update_userinfo_schema, update_password_schema ,update_avatar_schema} = require('../schema/user')

const router = express.Router()


const userinfo_handle = require('../router_handler/userinfo')

router.get('/userinfo',userinfo_handle.getUserInfo)

router.post('/updateUserInfo', expressJoi(update_userinfo_schema), userinfo_handle.updateUserInfo)

router.post('/updatepwd', expressJoi(update_password_schema), userinfo_handle.updatePassword)

router.post('/update/avatar', expressJoi(update_avatar_schema), userinfo_handle.updateAvatar)

module.exports = router